package learn3;

public class Student {
    //Java bean
    private String name;
    private int age;
    private String sex;
    private String address;

    public String getName()
    {
        return name;
    }
    public int getAge()
    {
        return age;
    }
    public String getSex()
    {
        return sex;
    }
    public String getAddress()
    {
        return address;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public void setAge(int age)
    {
        this.age = age;
    }
    public void setSex(String sex)
    {
        this.sex = sex;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }
    public Student(String name,int age,String sex,String address)
    {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.address = address;
    }
    public Student()
    {}
    @Override
    public String toString()
    {
        return "姓名："+name+"，年龄："+age+"，性别："+sex+"，地址："+address;
    }
}
